home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 7223 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.8 KB  |  53 lines

  1. Newsgroups: comp.lang.c
  2. Path: oitnews.harvard.edu!cfanews!head-cfa!sdoe
  3. From: sdoe@head-cfa.harvard.edu (Stephen Doe)
  4. Subject: Re: Leap Years
  5. Message-ID: <DMw2ts.7tL@cfanews.harvard.edu>
  6. Sender: news@cfanews.harvard.edu
  7. Organization: Smithsonian Astrophysical Observatory, Cambridge, MA,  USA
  8. References: <8BA8405.02C70020E1.uuout@sourcebbs.com> <4fsk14$jo2@kocrsv08.delcoelect.com> <3121EF9A.CA5@mail.isd.net> <4g28ut$p87@taurus.fccc.edu>
  9. Date: Fri, 16 Feb 1996 22:08:15 GMT
  10.  
  11. In article <4g28ut$p87@taurus.fccc.edu>, cherceg@fccc.edu (Carl Herceg) writes:
  12. > In article <3121EF9A.CA5@mail.isd.net>, "David A. Peterson"
  13. > <dpeterso@mail.isd.net> writes:
  14. > >Richard E. Fiegle wrote:
  15. > >> 
  16. > >> david.mohorn@sourcebbs.com (DAVID MOHORN) wrote:
  17. > >> >How do you feature out leap years?  If its evenly divisible by 400
  18. > >and
  19. > >> >4?
  20. > >> >
  21. > >> 
  22. > >> Anything divisible by 4 is already guaranteed to be
  23. > >> divisible by 400.
  24. > >
  25. > >
  26. > >Leap years are evenly divisible by 4, except those that are evenly
  27. > >divisible by 100.
  28. > >Leap centuries are evenly divisible by 400. 2000 will be a leap
  29. > >century!
  30. > Why, then, is 2000 a leap year, since it is evenly divisible by 100?
  31. > Wasn't 1900 a leap year? If 1904 was (1904/4=476) by your definition a
  32. > leap year, then 1900 must have been. Why are years that are evenly
  33. > divisible by 100 excluded?
  34.  
  35. Because the year is not precisely 365.25 days long; to be more exact, 
  36. the Gregorian calendar attempts to approximate the tropical year of 365.2422 
  37. mean solar days.  So, the rule is, a leap year is a year evenly divisible by 4; 
  38. but, only those century years divisible by 400 are leap years--unless
  39. it is also a century year divisible by 4000, in which case it is only
  40. 365 days long.  Thus,
  41.  
  42. 1900    Not
  43. 1903    Not
  44. 1904    Leap
  45. 2000    Leap
  46. 4000    Not
  47.  
  48. This gives the Gregorian calendar an accuracy of one day in 20,000 years.
  49.  
  50. SD
  51.